import java.io.Serializable;

/**
 * 场所缓存对象信息
 *
 * @Author Sugar
 * @Version 2018/1/10 16:56
 */
public class Service implements Serializable {
    protected Long id;
    protected String addr;
    protected Integer dataType;//数据类型
    protected boolean autoUpdate;//是否自动更新
    protected SubService sub;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }


    public String getAddr() {
        return addr;
    }

    public void setAddr(String addr) {
        this.addr = addr;
    }


    public Integer getDataType() {
        return dataType;
    }

    public void setDataType(Integer dataType) {
        this.dataType = dataType;
    }

    public boolean isAutoUpdate() {
        return autoUpdate;
    }

    public void setAutoUpdate(String autoUpdate) {
        this.autoUpdate = "1".equals(autoUpdate);
    }

    public SubService getSub() {
        return sub;
    }

    public void setSub(SubService sub) {
        this.sub = sub;
    }

    @Override
    public String toString() {
        return "{" +
                "id=" + id +
                ", addr=" + addr +
                ", dataType=" + dataType +
                ", autoUpdate=" + autoUpdate +
                ", sub=" + sub +
                '}';
    }

    public static final class Field {
        public static String id = "id";
        public static String code = "code";
        public static String name = "name";
        public static String addr = "addr";
        public static String type = "type";
        public static String area = "area";
        public static String lat = "lat";
        public static String lng = "lng";
        public static String dataType = "dataType";
        public static String auditState = "auditState";
        public static String autoUpdate = "autoUpdate";
    }
}
